#!/usr/bin/python
#-*-coding:utf-8-*-

import sys
from lib import *

if __name__ == '__main__':
    cpu = {}
    cpu["data"] = DataCenter()
    name = 'aoTest8'
    password = '123456'
    testNum = 100
    serial = 1
    
    if sys.argv[1]:
        name = sys.argv[1]
    if sys.argv[2]:
        password = sys.argv[2]   
    if sys.argv[3]:
        testNum = int(sys.argv[3])
    if sys.argv[4]:
        serial = int(sys.argv[4])

    startNum = 10001
    endNum = startNum + testNum
        
    if serial == 1:
        PT_intercom_httpSoftwareQuery(cpu, name, testNum)
    elif serial == 2:
        PT_intercom_httpLogin(cpu, name, password, startNum, endNum)
    elif serial == 3:
        PT_intercom_httpGroupQuery_noScreen(cpu, name, password, startNum, endNum)
    elif serial == 4:    
        PT_intercom_httpGroupQuery_bigScreen(cpu, name, password, startNum, endNum)
    elif serial == 5:
        PT_intercom_inVoiceChannel(cpu, name, password, startNum, endNum)
    else:
        pass
